<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // call功能
    // 1.更改函数内部的this
    // 2.调用函数执行代码
    function city(a,b) {
      console.log(this);
      console.log(a,"->",b);
    }
  city("hk","bj");
  var l1 = {length1:1000}
  // call参数为两个 ，参数1指定this，2传入的参数（参数列表：1,2,3,4）
    city.call(l1,"niuyue","english");
    city.call("niuyue","english");
  </script>
</body>
</html>